<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>
    
// includes(value,index)方法，用于判断数组或字符串中是否包含某个值，返回布尔值
// value 要判断的值
// index 起始下标，默认为0

let arr = [13,6,24,17,9,22];
let str = 'abcdefg12345';
console.log( arr.includes(17) );// true
console.log( arr.includes(27) );// false
console.log( arr.includes(6,2) );// false

console.log( str.includes('123') );// true
console.log( str.includes('456') );// false
console.log( str.includes('abc',1) );// false

</script>
</body>
</html>